package com.simplefaith.delisty.client.packet.manager;

import java.util.HashMap;

import com.simplefaith.delisty.client.packet.handler.PacketHandler;

public abstract class PacketTypeManager {

	public abstract int getOpCode();

	private final HashMap<Integer, PacketHandler> packetHandlerMaps;

	protected final void putPacketHandler(Integer packetOpCode,
			PacketHandler packetHandler) {
		packetHandlerMaps.put(packetOpCode, packetHandler);
	}

	/**
	 * get Packet Handler
	 * */
	public PacketHandler getPacketHandler(Integer packetOpCode) {
		return packetHandlerMaps.get(packetOpCode);
	}

	public PacketTypeManager() {
		packetHandlerMaps = new HashMap<Integer, PacketHandler>();
	}

}
